import {reqPageList} from '@/api/jurisdiction/users'

// 存储数据
const state=()=>{
   return{
     // 用户管理分页列表数据
     pageList :{},

   }
};

// 唯一修改state地方
const mutations = {
  GETUSERINFO(state, pageList){
    // console.log(pageList);
    state.pageList = pageList
    // console.log(state.pageList);
  }
}
// 处理异步 发请求
const actions = {
    // 获取用户分页列表数据
    async getUserInfo({state, commit, dispatch },{page,limit}){
        
        let result = await reqPageList(page,limit);
        //  console.log(result);
        if (result.code==20000){
          commit('GETUSERINFO',result.data)
        }
    }
  
}

export default {
    // namespaced: true,
    state,
    mutations,
    actions
  }